<template>
    <el-container>
        <!-- <el-aside style="width: 200px" class="hidden-sm-and-down">
            <modelAside></modelAside>
        </el-aside>
        <el-container>
            <el-header>
                <modelHeader></modelHeader>
            </el-header>
            <el-main style="height:100%;background-color: #E9EEF3;">
                <router-view v-if="isRouterAlive"></router-view>
            </el-main>
        </el-container> -->
		<el-header>
		    <modelHeader></modelHeader>
		</el-header>
		<el-container>
		    <el-aside style="width: 200px" class="hidden-sm-and-down">
		        <modelAside></modelAside>
		    </el-aside>
			<el-main style="height:100%;background-color: #E9EEF3;">
			    <router-view v-if="isRouterAlive"></router-view>
			</el-main>
		</el-container>
		
    </el-container>
</template>


<script>
import modelAside from "@/components/modelAside";
import modelHeader from "@/components/modelHeader";

export default {
    name: 'Home',
    components: {
        modelAside,
        modelHeader
    },
    methods: {
        reload() {
            this.isRouterAlive = false
            this.$nextTick(function () {
                this.isRouterAlive = true
            })
        }
    },
    provide() {
        return {
            reload: this.reload
        }
    },
    data() {
        return {
            isRouterAlive: true
        }
    }

}
</script>

<style>
.el-container {
    padding: 0;
    margin: 0;
    height: 100%;
}

.el-header {
    background-color: white;
	box-shadow: 0px 10px 50px -23px rgba(0, 0, 0, 0.4);
    color: #333;
    text-align: center;
    line-height: 60px;
	z-index: 5;
}

.el-aside {
    background-color: #D3DCE6;
	box-shadow: 50px 0px 50px -93px rgba(0, 0, 0, 0.4);
    color: #333;
    line-height: 200px;
	z-index: 4;
}
</style>
